<script type="text/javascript">
	
	  // When the document loads do everything inside here ...
	  $(document).ready(function(){
		
		// When a link is clicked
		$("a.tab").click(function () {
			
			
			// switch all tabs off
			$(".active").removeClass("active");
			
			// switch this tab on
			$(this).addClass("active");
			
			// slide all content up
			$(".content2").slideUp();
			
			// slide this content up
			var content_show = $(this).attr("title");
			$("#"+content_show).slideDown();
		  
		});
	
	  });
  </script>
  <br/><br/>
<h3>Çok Satanlar</h3>
<div id="tabbed_box_1" class="tabbed_box">
    <div class="tabbed_area">
    
    	
        <ul class="tabs">
            <li><a href="#" title="content_1" class="tab active" onclick="return false;">Kitap</a></li>
            <li><a href="#" title="content_2" class="tab" onclick="return false;">Film</a></li>
            <li><a href="#" title="content_3" class="tab" onclick="return false;">Müzik</a></li>

        </ul>
        
        <div id="content_1" class="content2">
        	<ul>
        		<?php foreach($top_books as $top_book):?>
            	<li><a href="/bookstore/books/view/<?php echo $top_book['Product']['id'];?>"><img class="tabbedimage" src="/bookstore/img/<?php echo $top_book['Product']['image']?>"/> <?php echo $top_book['Product']['name'];?><br/><small><?php echo $top_book['Producer']['full_name'];?></small></a></li>
            	<?php endforeach; ?>
			</ul>
        </div>
        <div id="content_2" class="content2">
        	<ul>
            	<?php foreach($top_films as $top_film):?>
            	<li><a href="/bookstore/films/view/<?php echo $top_film['Product']['id'];?>"><img class="tabbedimage" src="/bookstore/img/<?php echo $top_film['Product']['image']?>"/> <?php echo $top_film['Product']['name'];?><br/><small><?php echo $top_film['Producer']['full_name'];?></small></a></li>
            	<?php endforeach; ?>
			</ul>
        </div>
        <div id="content_3" class="content2">
        	<ul>
            	<?php foreach($top_musics as $top_music):?>
            	<li><a href="/bookstore/musics/view/<?php echo $top_music['Product']['id'];?>"><img class="tabbedimage" src="/bookstore/img/<?php echo $top_music['Product']['image']?>"/> <?php echo $top_music['Product']['name'];?><br/><small><?php echo $top_music['Producer']['full_name'];?></small></a></li>
            	<?php endforeach; ?>
			</ul>
        </div>
    
    </div>

</div>
